import sqlite3 as sl
con = sl.connect('my-test.db')

with con:
    con.execute("""
        create table if not exists user(
            id integer not null primary key autoincrement,
            name TEXT,
            age INTEGER
        );
    """)
    con.execute("delete from user")

    sql = "insert into user( name, age) values( ?, ?)"
    data = [
        ('Alice', 21),
        ( 'Bob', 22),
        ( 'Chris', 23)
    ]
    
    con.executemany(sql, data)
    
    selectData = con.execute("select * from user where age <=22")
    for row in selectData:
        print(row)
    